<template>
<!-- 顶部通栏 -->
<AppNavbar/>
<!-- 头部组件 -->
<AppHeader/>
<!-- <header>头部组件 </header> -->
<AppHeaderSticky/>
<!--主体内容-->
<div class="app-body">
<!--二级路由-->

<RouterView/>
</div>

<!-- 底部组件 -->
<AppFooter/>>
<<<<<<< HEAD
<button @click="$store.commit('user/setUser',{})">lougth</button>
<button @click="$store.commit('user/setUser',{token:123,account:'zs'})">login</button>
=======
<!--<button @click="$store.commit('user/setUser',{})">lougth</button>
<button @click="$store.commit('user/setUser',{token:123,account:'zs'})">login</button>-->
>>>>>>> ff
</template>
<script>
import AppNavbar from '@/components/app-navbar.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import { useStore } from 'vuex'
import AppHeaderSticky from '@/components/app-header-sticky.vue' 
   export default{
        name:'layout',
        components:{
            AppNavbar,
            AppHeader,
            AppFooter,
            AppHeaderSticky
        },
        // 获取下分类数据
        setup(){
            const store=useStore();
            store.dispatch('category/getList')
    }
   }
</script>
<style>
.app-body{
    min-height: 600px;
}
</style>